home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
a_utils
/
perl
/
msds-prl
/
ptchds19.zoo
/
ms-dos_h
< prev
next >
Wrap
Text File
|
1992-02-23
|
4KB
|
118 lines
MS-DOS patches to perl.
Apply this patch to the standard perl source, version 4, patch level 19,
using "patch -p." Do this in the root directory of the perl source
distribution.
You can cat all these patches together and pipe the output to patch -p.
Len Reed
Holos Software, Inc.
..!gatech!holos0!lbr
holos0!lbr@gatech.edu
--------------------------------------
*** msdos/ms-dos.h.old Sun Feb 23 08:48:16 1992
--- msdos/ms-dos.h Thu Nov 14 08:56:36 1991
***************
*** 0 ****
--- 1,100 ----
+ /* $Header: c:/usr/lbr/perl/RCS/ms-dos.h 1.1 90/10/15 15:18:53 lbr Exp $
+ *
+ * (C) Copyright 1988, 1990 Diomidis Spinellis.
+ * (C) Copyright 1990 Leonard Reed.
+ *
+ * You may distribute under the terms of the GNU General Public License
+ * as specified in the README file that comes with the perl 3.0 kit.
+ *
+ * $Log: ms-dos.h $
+ * Revision 1.1 90/10/15 15:18:53 lbr
+ * Initial revision
+ *
+ */
+
+ #ifndef MK_FP
+ /* Macro to make a far pointer from segment, offset */
+ # define MK_FP(seg,ofs) \
+ ((void far *) (((unsigned long)(seg) << 16) | (unsigned)(ofs)))
+ #endif
+
+ enum action {
+ han_delete, /* delete the (handle) file */
+ fdelete, /* delete the (stream) file */
+ execute, /* execute the command, file open as (FILE *) */
+ swap_file /* swap file (handle open) */
+ };
+
+ typedef union { /* handle or stream pointer */
+ FILE *f;
+ int h;
+ } HFD;
+
+ struct todo {
+ HFD hfd; /* handle or stream pointer */
+ char *name; /* Name of the file (to unlink) */
+ const char *command; /* Command to execute */
+ enum action what; /* What to do */
+ int child_status; /* "wait" value of child: used only
+ for pipes read by parent
+ */
+ struct todo *next; /* Next structure */
+ };
+
+ struct todo *add_temp_file(FILE *, int, char *, char *, enum action , int);
+ void block_signals(void);
+ void unblock_signals(void);
+ void msdos_sig_death(int);
+ int swap_spawn(int, char *, char **);
+ int exec( int, char far *, char far *, int, int);
+ void cleanup_msdos_temps(void);
+
+ /* Structure of MS-DOS system file table entry. Sure is silly that we
+ have to play with this. The pack pragma is because the words in
+ this table are not even word aligned! (The guys who "designed"
+ this stuff never looked beyond the 8088.)
+
+ Refer to Waite Group's MS-DOS Developer Guide, 2nd. edition, pp. 212-213,
+ for infor about this structure.
+ */
+
+ #pragma pack(1)
+ struct sft {
+ unsigned int ref_count; /* number of references */
+ unsigned int open_mode;
+ unsigned char dattrib;
+ unsigned int flags; /* flags including DOS_SFT_NOINHERIT */
+ unsigned long dbb;
+ unsigned int init_cluster;
+ unsigned int time;
+ unsigned int date;
+ unsigned long file_size;
+ unsigned long file_offset;
+ unsigned int relative_cluster;
+ unsigned int current_cluster;
+ unsigned int block_number;
+ unsigned char dir_index;
+ char file_name[8];
+ char file_ext[3];
+ char unknown[4];
+ unsigned int mach_owner;
+ unsigned int psp_owner;
+ unsigned int status;
+ char only_in_40[6]; /* unknown, only found in DOS 4.0+ */
+ };
+ #pragma pack()
+
+ /* Convert handle to MS-DOS system file table entry pointer */
+ struct sft far * dos_sys_file(int);
+
+ #define DOS_SFT_NOINHERIT 0x1000 /* flags mask for noinherit by child */
+
+ int dos_get_nofiles(void);
+ unsigned char far * dos_get_sft_map(void);
+
+ /* Call dos directly, bypassing the C library "intelligence." */
+ int dos_close(int);
+ int dos_dup(int);
+ int dos_dup2(int, int);
+
+ #define KSH_META_CHARS "*\"?<>|()&][$#`'\\" /* Korn shell metachars */